<?php
namespace Guider\Model;
use Think\Model;

class CallRecordModel extends Model {
	protected $_auto = [
		["create_time", "time", 1, "function"],
		["update_time", "time", 2, "function"],
	];
	protected $_validate = [
		["id", "require", "ID必须填写!"],
		["calling_user_id", "require", "主叫用户必须填写!"],
		["calling_user_phone", "require", "主叫电话必须填写!"],
		["called_user_id", "require", "被叫用户必须填写!"],
		["called_user_phone", "require", "被叫电话必须填写!"],
		["create_time", "require", "创建时间必须填写!"],
		["update_time", "require", "更新时间必须填写!"],
	];
	public $excel = false;
	public $delete = false;
	public $update = false;
	public $fieldMap = [
		"id" => [
			"type" => "input",
			"name" => "ID",
			"show" => true,
			"search" => true,
			"input" => false,
			"required" => true,
			"detail" => true,
			"excel" => true,
			"content" => "",
			"list_specify" => "",
			"update_specify" => "",
			"detail_specify" => "",
		],
		"calling_user_id" => [
			"type" => "foreign",
			"name" => "主叫用户",
			"show" => true,
			"search" => false,
			"input" => true,
			"required" => true,
			"detail" => true,
			"excel" => true,
			"content" => "user,id,name",
			"list_specify" => "",
			"update_specify" => "",
			"detail_specify" => "",
		],
		"calling_user_phone" => [
			"type" => "input",
			"name" => "主叫电话",
			"show" => false,
			"search" => false,
			"input" => false,
			"required" => true,
			"detail" => false,
			"excel" => true,
			"content" => "",
			"list_specify" => "",
			"update_specify" => "",
			"detail_specify" => "",
		],
		"called_user_id" => [
			"type" => "foreign",
			"name" => "被叫用户",
			"show" => true,
			"search" => false,
			"input" => true,
			"required" => true,
			"detail" => true,
			"excel" => true,
			"content" => "user,id,name",
			"list_specify" => "",
			"update_specify" => "",
			"detail_specify" => "",
		],
		"called_user_phone" => [
			"type" => "input",
			"name" => "被叫电话",
			"show" => false,
			"search" => false,
			"input" => false,
			"required" => true,
			"detail" => false,
			"excel" => true,
			"content" => "",
			"list_specify" => "",
			"update_specify" => "",
			"detail_specify" => "",
		],
		"create_time" => [
			"type" => "datetime",
			"name" => "呼叫时间",
			"show" => false,
			"search" => false,
			"input" => false,
			"required" => true,
			"detail" => true,
			"excel" => true,
			"content" => "",
			"list_specify" => "",
			"update_specify" => "",
			"detail_specify" => "",
		],
		"update_time" => [
			"type" => "datetime",
			"name" => "更新时间",
			"show" => false,
			"search" => false,
			"input" => false,
			"required" => true,
			"detail" => true,
			"excel" => true,
			"content" => "",
			"list_specify" => "",
			"update_specify" => "",
			"detail_specify" => "",
		],
	];
}